<!--
@author huangHe
-->
<template>
    <div>
        <bill-detail-wrapper
            v-model="billDetailVisible"
            :showType="billDetailShowType"
            :template-id="billDetailTemplateId"
            :bill-id="billDetailBillId"
            :disabled="billDetailDisabled"
            @afterInitTemplate="afterInitTemplate"
            @afterInitBillData="afterInitBillData"
            @buttonClick="buttonClick"
            @goBack="goBack"/>
    </div>
</template>

<script>
import { mapState } from 'vuex';
export default {
    name: 'useapplyBill',
    props: {},
    components: {},
    data() {
        return {};
    },
    computed: {
        // 详情页面显示状态
        billDetailVisible: {
            get: function() {
                return this.$store.state.commonStore.billDetailVisible;
            },
            set: function(val) {
                this.$store.dispatch('setBillDetailVisibleAction', val);
            }
        },
        ...mapState({
            billDetailShowType: state => state.commonStore.billDetailShowType, // 详情页面打开方式
            billDetailTemplateId: state => state.commonStore.billDetailTemplateId, // 详情页面模板id
            billDetailBillId: state => state.commonStore.billDetailBillId, // 详情页面模板id
            billDetailDisabled: state => state.commonStore.billDetailDisabled // 详情页面修改状态
        })
    },
    created() {
    },
    methods: {
        afterInitTemplate(template) {
        },
        afterInitBillData(billData) {
        },
        buttonClick(_this, item, rows, filterWorkflow, businessId) {

        },
        // 返回  关闭详情页面
        goBack() {
            // this.$store.dispatch('setBillDetailVisibleAction', false);
        }
    },
    mounted() {
    },
    watch: {}
};
</script>

<style scoped></style>
